package yunwo.cn.yzstation.presenter;

import java.util.List;

import yunwo.cn.yzstation.api.IcanAssigView;
import yunwo.cn.yzstation.api.IscanAssigModel;
import yunwo.cn.yzstation.base.BasePresenter;
import yunwo.cn.yzstation.bean.AssigmnetBean;
import yunwo.cn.yzstation.bean.ContinueBean;
import yunwo.cn.yzstation.bean.ItemlistBean;
import yunwo.cn.yzstation.model.ScanAssigModel;
import yunwo.cn.yzstation.view.activity.ScanAssigAcivity;

/**
 * Created by lao on 2017/10/13.
 */

public class ScanAssigPersenter extends BasePresenter<IcanAssigView> implements IscanAssigModel {
    ScanAssigAcivity scanAssigAcivity;
    IcanAssigView icanAssigView;
    private final ScanAssigModel mScanAssigModel;

    public ScanAssigPersenter(ScanAssigAcivity scanAssigAcivity, IcanAssigView icanAssigView) {
        this.scanAssigAcivity = scanAssigAcivity;
        this.icanAssigView = icanAssigView;
        mScanAssigModel = new ScanAssigModel(scanAssigAcivity, this);
    }

    public void getoBtainTrack() {
        mScanAssigModel.getoBtainTrack();
    }

    @Override
    public void getoBtainTrackSueecss(List<ItemlistBean.DataBean> dataBeanList) {
        icanAssigView.getoBtainTrackSueecss(dataBeanList);
    }

    @Override
    public void completeSueescc() {
        icanAssigView.completeSueescc();
    }

    public void complete(AssigmnetBean assigmentBean, ContinueBean.DataBean mContinueBean, List<ItemlistBean.DataBean> selectedCollectedCars) {
        mScanAssigModel.complete(assigmentBean,mContinueBean,selectedCollectedCars);
    }
}
